
package au.com.lastweekend.jim.actions;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

import au.com.lastweekend.jim.swing.SwingUtil;

public class ReloadActiveSheetAction extends AbstractAction {

    private static final long serialVersionUID = 1L;

    public interface ReloadActiveSheetController {

        void resetSelection();

    }

    private ReloadActiveSheetController controller;

    public ReloadActiveSheetAction(ReloadActiveSheetController controller) {

        super("Refresh");
        this.controller = controller;
        SwingUtil.setActionParameters(this, "page_refresh.png", "Refresh", "Reload the current view");
        putValue(SwingUtil.MENU, "View");
        putValue(SwingUtil.TOOLBAR, Boolean.TRUE);
    }

    public void actionPerformed(ActionEvent e) {

        controller.resetSelection();

    }

}
